﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BCGC.BLL.Helper;
using BCGC.BLL.BusinessObject.UserAccount;
using Jalal.Library.Utility;
using Jalal.Library.Web;

public partial class AdminLogin : PublicBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Login_Click(object sender, EventArgs e)
    {
        Admin admin = new Admin();
        admin.Login(Security.BindStringInput(tbxUsername.Text, SecurityLevel.Three), 
            Security.BindStringInput(tbxPassword.Text, SecurityLevel.Three));

        if (SessionManager.IsAdminUserLoggedIn)
            Response.Redirect(CustomSiteMap.AdminHome);
        else
            uccResponse.SetFailMessage("Login failed");
    }
}
